package com.imut.hcdp.mapper;

import java.util.List;
import com.imut.hcdp.domain.HcdpTrainRoute;
import com.imut.hcdp.domain.SeatPrice;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

@Mapper
public interface HcdpTrainRouteMapper
{

    public HcdpTrainRoute selectHcdpTrainRouteById(Long id);


    public List<HcdpTrainRoute> selectHcdpTrainRouteList(HcdpTrainRoute hcdpTrainRoute);

    /**
     * 筛选时间符合的车程
     * @param hcdpTrainRoute
     * @return
     */
    public List<HcdpTrainRoute> selectHcdpTrainRouteListByTime(HcdpTrainRoute hcdpTrainRoute);

    /**
     * 查询当天是否由形成
     * @param hcdpTrainRoute
     * @return
     */
    public List<Long> checkRoute(HcdpTrainRoute hcdpTrainRoute);


    public int insertHcdpTrainRoute(HcdpTrainRoute hcdpTrainRoute);


    public int updateHcdpTrainRoute(HcdpTrainRoute hcdpTrainRoute);


    public int deleteHcdpTrainRouteById(Long id);


    public int deleteHcdpTrainRouteByIds(Long[] ids);

    /**
     * 查询有行程的车次
     * @param checkRoute
     * @return
     */
    List<HcdpTrainRoute> getById(@Param("list") List<Long> checkRoute);

    /**
     * 获取座位类型及信息
     * @param routeId
     * @param s
     * @param e
     * @return
     */
    List<Long> seatPriceIds(@Param("id") Long routeId, @Param("s") Long s, @Param("e")Long e);

    List<SeatPrice> seatPrice(@Param("list") List<Long> seatIds,@Param("id") Long routeId);
}
